This investigation uses the football dataset provided through this link: (https://www.kaggle.com/datasets/hugomathien/soccer). The perspective taken was that of analysing the creative attributes of the teams that win championships. The English Premier League was selected as the focus with the period of 2009 to 2015.
The pandas documentation was utilized for reference (https://pandas.pydata.org/docs/)
The plotly documentation was utilized for plotting reference (https://plotly.com/python/radar-chart/)
# Use this cell to set up import statements for all of the packages that you
# plan to use.
# Remember to include a 'magic word' so that your visualizations are plotted
# inline with the notebook. See this page for more:
# http://ipython.readthedocs.io/en/stable/interactive/magics.html
import pandas as pd
# import sqlite3
import numpy as np
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
%matplotlib inline
# Loading the relevant files
df_T = pd.read_csv('Team.csv')
df_TA = pd.read_csv('Team_Attributes.csv')
# Creating a dataframe join
df = pd.merge(df_T, df_TA, on='team_api_id', how='left')
# Verify that result of SQL query is stored in the dataframe
df.head()
| id_x | team_api_id | team_fifa_api_id_x | team_long_name | team_short_name | id_y | team_fifa_api_id_y | date | buildUpPlaySpeed | buildUpPlaySpeedClass | ... | chanceCreationShooting | chanceCreationShootingClass | chanceCreationPositioningClass | defencePressure | defencePressureClass | defenceAggression | defenceAggressionClass | defenceTeamWidth | defenceTeamWidthClass | defenceDefenderLineClass | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 9987 | 673.0 | KRC Genk | GEN | 485.0 | 673.0 | 2010-02-22 00:00:00 | 45.0 | Balanced | ... | 60.0 | Normal | Organised | 70.0 | High | 65.0 | Press | 70.0 | Wide | Cover |
| 1 | 1 | 9987 | 673.0 | KRC Genk | GEN | 486.0 | 673.0 | 2011-02-22 00:00:00 | 66.0 | Balanced | ... | 51.0 | Normal | Organised | 48.0 | Medium | 47.0 | Press | 54.0 | Normal | Offside Trap |
| 2 | 1 | 9987 | 673.0 | KRC Genk | GEN | 487.0 | 673.0 | 2012-02-22 00:00:00 | 53.0 | Balanced | ... | 56.0 | Normal | Organised | 47.0 | Medium | 45.0 | Press | 55.0 | Normal | Cover |
| 3 | 1 | 9987 | 673.0 | KRC Genk | GEN | 488.0 | 673.0 | 2013-09-20 00:00:00 | 58.0 | Balanced | ... | 56.0 | Normal | Organised | 47.0 | Medium | 45.0 | Press | 55.0 | Normal | Cover |
| 4 | 1 | 9987 | 673.0 | KRC Genk | GEN | 489.0 | 673.0 | 2014-09-19 00:00:00 | 58.0 | Balanced | ... | 56.0 | Normal | Organised | 47.0 | Medium | 45.0 | Press | 55.0 | Normal | Cover |
5 rows × 29 columns
# Shape of the data
df.shape
(1469, 29)
# Description of the data
df.describe()
| id_x | team_api_id | team_fifa_api_id_x | id_y | team_fifa_api_id_y | buildUpPlaySpeed | buildUpPlayDribbling | buildUpPlayPassing | chanceCreationPassing | chanceCreationCrossing | chanceCreationShooting | defencePressure | defenceAggression | defenceTeamWidth | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 1469.000000 | 1469.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 489.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 1458.000000 | 1458.000000 |
| mean | 22750.390061 | 10213.878829 | 17706.982167 | 729.500000 | 17706.982167 | 52.462277 | 48.607362 | 48.490398 | 52.165295 | 53.731824 | 53.969136 | 46.017147 | 49.251029 | 52.185871 |
| std | 15032.343553 | 14675.457811 | 39179.857739 | 421.032659 | 39179.857739 | 11.545869 | 9.678290 | 10.896101 | 10.360793 | 11.086796 | 10.327566 | 10.227225 | 9.738028 | 9.574712 |
| min | 1.000000 | 1601.000000 | 1.000000 | 1.000000 | 1.000000 | 20.000000 | 24.000000 | 20.000000 | 21.000000 | 20.000000 | 22.000000 | 23.000000 | 24.000000 | 29.000000 |
| 25% | 9548.000000 | 8456.000000 | 110.000000 | 365.250000 | 110.000000 | 45.000000 | 42.000000 | 40.000000 | 46.000000 | 47.000000 | 48.000000 | 39.000000 | 44.000000 | 47.000000 |
| 50% | 20525.000000 | 8674.000000 | 485.000000 | 729.500000 | 485.000000 | 52.000000 | 49.000000 | 50.000000 | 52.000000 | 53.000000 | 53.000000 | 45.000000 | 48.000000 | 52.000000 |
| 75% | 35295.000000 | 9904.000000 | 1900.000000 | 1093.750000 | 1900.000000 | 62.000000 | 55.000000 | 55.000000 | 59.000000 | 62.000000 | 61.000000 | 51.000000 | 55.000000 | 58.000000 |
| max | 51606.000000 | 274581.000000 | 112513.000000 | 1458.000000 | 112513.000000 | 80.000000 | 77.000000 | 80.000000 | 80.000000 | 80.000000 | 80.000000 | 72.000000 | 72.000000 | 73.000000 |
# View the index number and label for each column
def view_index():
for i, v in enumerate(df.columns):
print(i, v)
# View the index number and label for each column
view_index()
0 id_x 1 team_api_id 2 team_fifa_api_id_x 3 team_long_name 4 team_short_name 5 id_y 6 team_fifa_api_id_y 7 date 8 buildUpPlaySpeed 9 buildUpPlaySpeedClass 10 buildUpPlayDribbling 11 buildUpPlayDribblingClass 12 buildUpPlayPassing 13 buildUpPlayPassingClass 14 buildUpPlayPositioningClass 15 chanceCreationPassing 16 chanceCreationPassingClass 17 chanceCreationCrossing 18 chanceCreationCrossingClass 19 chanceCreationShooting 20 chanceCreationShootingClass 21 chanceCreationPositioningClass 22 defencePressure 23 defencePressureClass 24 defenceAggression 25 defenceAggressionClass 26 defenceTeamWidth 27 defenceTeamWidthClass 28 defenceDefenderLineClass
# Check for duplicates
sum(df.duplicated())
0
# Check for null values
df.isnull().sum()
id_x 0 team_api_id 0 team_fifa_api_id_x 11 team_long_name 0 team_short_name 0 id_y 11 team_fifa_api_id_y 11 date 11 buildUpPlaySpeed 11 buildUpPlaySpeedClass 11 buildUpPlayDribbling 980 buildUpPlayDribblingClass 11 buildUpPlayPassing 11 buildUpPlayPassingClass 11 buildUpPlayPositioningClass 11 chanceCreationPassing 11 chanceCreationPassingClass 11 chanceCreationCrossing 11 chanceCreationCrossingClass 11 chanceCreationShooting 11 chanceCreationShootingClass 11 chanceCreationPositioningClass 11 defencePressure 11 defencePressureClass 11 defenceAggression 11 defenceAggressionClass 11 defenceTeamWidth 11 defenceTeamWidthClass 11 defenceDefenderLineClass 11 dtype: int64
Since the dataset is primarily numerict, we can replace the null values with zero for a more seamless set of data types
We will only replace the data for the columns we picked to answer our questions. Later we will drop the columns that aren't used
# Replace null values with zero per relevant row
df["team_fifa_api_id_x"].fillna(0, inplace = True)
df["date"].fillna(0, inplace = True)
df["buildUpPlaySpeed"].fillna(0, inplace = True)
df["chanceCreationPassing"].fillna(0, inplace = True)
df["chanceCreationCrossing"].fillna(0, inplace = True)
df["chanceCreationShooting"].fillna(0, inplace = True)
# Check if null values were replaced
df.isnull().sum()
id_x 0 team_api_id 0 team_fifa_api_id_x 0 team_long_name 0 team_short_name 0 id_y 11 team_fifa_api_id_y 11 date 0 buildUpPlaySpeed 0 buildUpPlaySpeedClass 11 buildUpPlayDribbling 980 buildUpPlayDribblingClass 11 buildUpPlayPassing 11 buildUpPlayPassingClass 11 buildUpPlayPositioningClass 11 chanceCreationPassing 0 chanceCreationPassingClass 11 chanceCreationCrossing 0 chanceCreationCrossingClass 11 chanceCreationShooting 0 chanceCreationShootingClass 11 chanceCreationPositioningClass 11 defencePressure 11 defencePressureClass 11 defenceAggression 11 defenceAggressionClass 11 defenceTeamWidth 11 defenceTeamWidthClass 11 defenceDefenderLineClass 11 dtype: int64
# Dropping unnecessary columns
dropped_columns = ['id_x', 'id_y', 'team_short_name', 'team_fifa_api_id_y', 'buildUpPlaySpeedClass', 'buildUpPlayDribbling',
'buildUpPlayDribblingClass', 'buildUpPlayPassing', 'buildUpPlayPassingClass', 'buildUpPlayPositioningClass',
'chanceCreationPassingClass', 'chanceCreationShootingClass', 'chanceCreationCrossingClass', 'chanceCreationShootingClass',
'chanceCreationPositioningClass', 'defencePressure', 'defencePressureClass', 'defenceAggression', 'defenceAggressionClass',
'defenceTeamWidth', 'defenceTeamWidthClass', 'defenceDefenderLineClass']
df.drop(dropped_columns, inplace=True, axis=1)
# View the index number and label for each column
view_index()
0 team_api_id 1 team_fifa_api_id_x 2 team_long_name 3 date 4 buildUpPlaySpeed 5 chanceCreationPassing 6 chanceCreationCrossing 7 chanceCreationShooting
# creation of the attributes dataframe
df_A = df
df_A.head()
| team_api_id | team_fifa_api_id_x | team_long_name | date | buildUpPlaySpeed | chanceCreationPassing | chanceCreationCrossing | chanceCreationShooting | |
|---|---|---|---|---|---|---|---|---|
| 0 | 9987 | 673.0 | KRC Genk | 2010-02-22 00:00:00 | 45.0 | 50.0 | 35.0 | 60.0 |
| 1 | 9987 | 673.0 | KRC Genk | 2011-02-22 00:00:00 | 66.0 | 65.0 | 66.0 | 51.0 |
| 2 | 9987 | 673.0 | KRC Genk | 2012-02-22 00:00:00 | 53.0 | 55.0 | 48.0 | 56.0 |
| 3 | 9987 | 673.0 | KRC Genk | 2013-09-20 00:00:00 | 58.0 | 67.0 | 48.0 | 56.0 |
| 4 | 9987 | 673.0 | KRC Genk | 2014-09-19 00:00:00 | 58.0 | 67.0 | 48.0 | 56.0 |
# save this for later
df_A.to_csv('football_dataset_creativity.csv', index=False)
df_fdc = pd.read_csv('football_dataset_creativity.csv')
df_fdc.head()
| team_api_id | team_fifa_api_id_x | team_long_name | date | buildUpPlaySpeed | chanceCreationPassing | chanceCreationCrossing | chanceCreationShooting | |
|---|---|---|---|---|---|---|---|---|
| 0 | 9987 | 673.0 | KRC Genk | 2010-02-22 00:00:00 | 45.0 | 50.0 | 35.0 | 60.0 |
| 1 | 9987 | 673.0 | KRC Genk | 2011-02-22 00:00:00 | 66.0 | 65.0 | 66.0 | 51.0 |
| 2 | 9987 | 673.0 | KRC Genk | 2012-02-22 00:00:00 | 53.0 | 55.0 | 48.0 | 56.0 |
| 3 | 9987 | 673.0 | KRC Genk | 2013-09-20 00:00:00 | 58.0 | 67.0 | 48.0 | 56.0 |
| 4 | 9987 | 673.0 | KRC Genk | 2014-09-19 00:00:00 | 58.0 | 67.0 | 48.0 | 56.0 |
# Description of the data
df_fdc.describe()
| team_api_id | team_fifa_api_id_x | buildUpPlaySpeed | chanceCreationPassing | chanceCreationCrossing | chanceCreationShooting | |
|---|---|---|---|---|---|---|
| count | 1469.000000 | 1469.000000 | 1469.000000 | 1469.000000 | 1469.000000 | 1469.000000 |
| mean | 10213.878829 | 17574.390742 | 52.069435 | 51.774677 | 53.329476 | 53.565010 |
| std | 14675.457811 | 39062.649049 | 12.360307 | 11.259644 | 11.977799 | 11.292526 |
| min | 1601.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
| 25% | 8456.000000 | 109.000000 | 45.000000 | 46.000000 | 47.000000 | 48.000000 |
| 50% | 8674.000000 | 483.000000 | 52.000000 | 52.000000 | 53.000000 | 53.000000 |
| 75% | 9904.000000 | 1897.000000 | 62.000000 | 59.000000 | 62.000000 | 61.000000 |
| max | 274581.000000 | 112513.000000 | 80.000000 | 80.000000 | 80.000000 | 80.000000 |
# Info of the data
df_fdc.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 1469 entries, 0 to 1468 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 team_api_id 1469 non-null int64 1 team_fifa_api_id_x 1469 non-null float64 2 team_long_name 1469 non-null object 3 date 1469 non-null object 4 buildUpPlaySpeed 1469 non-null float64 5 chanceCreationPassing 1469 non-null float64 6 chanceCreationCrossing 1469 non-null float64 7 chanceCreationShooting 1469 non-null float64 dtypes: float64(5), int64(1), object(2) memory usage: 91.9+ KB
team_long_name refers to the football clubs full name
team_fifa_api_id_x refers to the identifier given by FIFA to the football club for reference
team_api_id refers to the identifier for each football club for reference
date this is the record of the date i.e. the season when the data was recorded
buildUpPlaySpeed refers to the speed/rate a team takes link up play leading to the creation of a goal scoring opportunity (this figure would most likely be an average of all the matches within a season)
chanceCreationPassing refers to the creation of passing chances per season (this figure would most likely be an average of all the matches within a season)
chanceCreationCrossing refers to the creation of crossing chances per season (this figure would most likely be an average of all the matches within a season)
chanceCreationShooting refers to the creation of shooting chances per season (this figure would most likely be an average of all the matches within a season)
# Operations on the data
# Rename the columns
df_fdc.rename(columns = {'team_long_name':'team_name', 'team_fifa_api_id_x':'fifa_id', 'team_api_id':'team_id'}, inplace = True)
# Truncate the date column for the plot
df_fdc['date'] = df_fdc['date'].str[:4]
# View the index number and label for each column
view_index()
0 team_api_id 1 team_fifa_api_id_x 2 team_long_name 3 date 4 buildUpPlaySpeed 5 chanceCreationPassing 6 chanceCreationCrossing 7 chanceCreationShooting
- Build up play speed
- Chance creation (passing)
- Chance creation (crossing)
- Chance creation (shooting)
df_Chelsea = df_fdc[df_fdc["team_name"] == "Chelsea"]
df_M_United = df_fdc[df_fdc["team_name"] == "Manchester United"]
df_M_City = df_fdc[df_fdc["team_name"] == "Manchester City"]
# Line plot function
def line_plot(p1,p2,p3,title,xlabel,ylabel,label_10,label_11,label_12,label_13,label_14,label_15):
x1 = df_Chelsea['date']
x2 = df_M_United['date']
x3 = df_M_City['date']
y1 = p1
y2 = p2
y3 = p3
plt.title(title)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
Chelsea, = plt.plot(x1, y1, label="Chelsea", marker='o', color='blue')
M_United, = plt.plot(x2, y2, label="Manchester United", marker='o', color='red')
M_City, = plt.plot(x3, y3, label="Manchester City", marker='o', color='green')
#Champion Label
label_10
label_11
label_12
label_13
label_14
label_15
leg = plt.legend(loc='lower left')
plt.show()
# plot distribution of build up play speed
line_plot(df_Chelsea['buildUpPlaySpeed'],
df_M_United['buildUpPlaySpeed'],
df_M_City['buildUpPlaySpeed'],
'EPL Champions Build Up Play Between 2010 and 2015',
'Year',
'Rate of Build Up Play (Speed)',
plt.text(0,70,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,45,'City'),
plt.text(3,46,'United'),
plt.text(4,59,'City'),
plt.text(5,67,'Chelsea'))
Based on the results from the chart of build up play speed, we may conclude that our initial question does not always fit as in the 2011, 2012 and 2014, the EPL champions were not as direct in their build up play compared to the other two teams that were frequent winners within the period of 2010 to 2015
# plot distribution of passing chance creation
line_plot(df_Chelsea['chanceCreationPassing'],
df_M_United['chanceCreationPassing'],
df_M_City['chanceCreationPassing'],
'EPL Champions Pass Creation Between 2010 and 2015',
'Year',
'# Chances Created (Passing)',
plt.text(0,56,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,40,'City'),
plt.text(3,46,'United'),
plt.text(4,32,'City'),
plt.text(5,41,'Chelsea'))
For passing chance creation the teams that won the EPL in the 2011, 2012, 2014 and 2015 season weren't at the top of the passing chance creation charts. The seasons 2011, 2012 and 2014 are present once more.
# plot distribution of crossing chance creation
line_plot(df_Chelsea['chanceCreationCrossing'],
df_M_United['chanceCreationCrossing'],
df_M_City['chanceCreationCrossing'],
'EPL Champions Cross Creation Between 2010 and 2015',
'Year',
'# Chances Created (Crossing)',
plt.text(0,70,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,38,'City'),
plt.text(3,68,'United'),
plt.text(4,49,'City'),
plt.text(5,34,'Chelsea'))
Cross chance creation starts of at a high rate before dropping off for all teams as the seasons progress. In this case the seasons are 2012 and 2014 common in the previous visualizations where the champion doesn't lead the charts.
# plot distribution of shooting chance creation
line_plot(df_Chelsea['chanceCreationShooting'],
df_M_United['chanceCreationShooting'],
df_M_City['chanceCreationShooting'],
'EPL Champions Shot Creation Between 2010 and 2015',
'Year',
'# Chances Created (Shots)',
plt.text(0,70,'Chelsea'),
plt.text(1,70,'United'),
plt.text(2,48,'City'),
plt.text(3,37,'United'),
plt.text(4,62,'City'),
plt.text(5,44,'Chelsea'))
For the seasons 2011, 2012, 2013 and 2014 the champion does not produce the most shot creation chances.
# Bar plot function
def bar_plot(x1,x2,x3,title,ylabel,label_10,label_11,label_12,label_13,label_14,label_15):
N = 6
ind = np.arange(N)
width = 0.25
Chelsea = x1
M_United = x2
M_City = x3
bar1 = plt.bar(ind, Chelsea, width, color = 'b')
bar2 = plt.bar(ind+width, M_United, width, color='r')
bar3 = plt.bar(ind+width*2, M_City, width, color = 'g')
plt.title(title)
plt.xlabel("Year")
plt.ylabel(ylabel)
#Champion Label
label_10
label_11
label_12
label_13
label_14
label_15
plt.xticks(ind+width,['2010', '2011', '2012', '2013', '2014', '2015'])
plt.legend((bar1, bar2, bar3), ('Chelsea', 'United', 'City'))
plt.show()
# plot a bar graph for build up play speed
bar_plot(df_Chelsea['buildUpPlaySpeed'],
df_M_United['buildUpPlaySpeed'],
df_M_City['buildUpPlaySpeed'],
'EPL Champions Build Up Play Between 2010 and 2015',
'Rate of Build Up Play (Speed)',
plt.text(0,70,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,45,'City'),
plt.text(3,46,'United'),
plt.text(4,59,'City'),
plt.text(5,67,'Chelsea'))
Based on the results from the chart of build up play speed, we may conclude that our initial question does not always fit as in the 2011, 2012 and 2014, the EPL champions were not as direct in their build up play compared to the other two teams that were frequent winners within the period of 2010 to 2015
# plot a bar graph for chance creation passing
bar_plot(df_Chelsea['chanceCreationPassing'],
df_M_United['chanceCreationPassing'],
df_M_City['chanceCreationPassing'],
'EPL Champions Chance Created (Passes) Between 2010 and 2015',
'# Passing Chances Created',
plt.text(0,56,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,40,'City'),
plt.text(3,46,'United'),
plt.text(4,32,'City'),
plt.text(5,41,'Chelsea'))
For passing chance creation the teams that won the EPL in the 2011, 2012, 2014 and 2015 season weren't at the top of the passing chance creation charts. The seasons 2011, 2012 and 2014 are present once more.
# plot a bar graph for chance creation crossing
bar_plot(df_Chelsea['chanceCreationCrossing'],
df_M_United['chanceCreationCrossing'],
df_M_City['chanceCreationCrossing'],
'EPL Champions Chance Created (Crosses) Between 2010 and 2015',
'# Crossing Chances Created',
plt.text(0,70,'Chelsea'),
plt.text(1,65,'United'),
plt.text(2,38,'City'),
plt.text(3,68,'United'),
plt.text(4,49,'City'),
plt.text(5,34,'Chelsea'))
Cross chance creation starts of at a high rate before dropping off for all teams as the seasons progress. In this case the seasons are 2012 and 2014 common in the previous visualizations where the champion doesn't lead the charts.
# plot a bar graph for chance creation shooting
bar_plot(df_Chelsea['chanceCreationShooting'],
df_M_United['chanceCreationShooting'],
df_M_City['chanceCreationShooting'],
'EPL Champions Chance Created (Shots) Between 2010 and 2015',
'# Shooting Chances Created',
plt.text(0,70,'Chelsea'),
plt.text(1,70,'United'),
plt.text(2,48,'City'),
plt.text(3,37,'United'),
plt.text(4,62,'City'),
plt.text(5,44,'Chelsea'))
For the seasons 2011, 2012, 2013 and 2014 the champion does not produce the most shot creation chances.
# Combined Radar Charts for build up play speed
years = ['2010','2011','2012','2013','2014','2015']
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
r=df_Chelsea['buildUpPlaySpeed'],
theta=years,
fill='toself',
name='Chelsea'
))
fig.add_trace(go.Scatterpolar(
r=df_M_United['buildUpPlaySpeed'],
theta=years,
fill='toself',
name='Manchester United'
))
fig.add_trace(go.Scatterpolar(
r=df_M_City['buildUpPlaySpeed'],
theta=years,
fill='toself',
name='Manchester City'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 100]
)),
showlegend=False
)
fig.show()
The radar chart above represents the progression over the period of 2010 to 2015 for build up play speed per club. Hovering above the coloured sections will relay the club.
# Combined Radar Charts for chance creation passing
years = ['2010','2011','2012','2013','2014','2015']
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
r=df_Chelsea['chanceCreationPassing'],
theta=years,
fill='toself',
name='Chelsea'
))
fig.add_trace(go.Scatterpolar(
r=df_M_United['chanceCreationPassing'],
theta=years,
fill='toself',
name='Manchester United'
))
fig.add_trace(go.Scatterpolar(
r=df_M_City['chanceCreationPassing'],
theta=years,
fill='toself',
name='Manchester City'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 100]
)),
showlegend=False
)
fig.show()
The radar chart above represents the progression over the period of 2010 to 2015 for chance creation for passing per club. Hovering above the coloured sections will relay the club.
# Combined Radar Charts for chance creation crossing
years = ['2010','2011','2012','2013','2014','2015']
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
r=df_Chelsea['chanceCreationCrossing'],
theta=years,
fill='toself',
name='Chelsea'
))
fig.add_trace(go.Scatterpolar(
r=df_M_United['chanceCreationCrossing'],
theta=years,
fill='toself',
name='Manchester United'
))
fig.add_trace(go.Scatterpolar(
r=df_M_City['chanceCreationCrossing'],
theta=years,
fill='toself',
name='Manchester City'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 100]
)),
showlegend=False
)
fig.show()
The radar chart above represents the progression over the period of 2010 to 2015 for chance creation for crossing per club. Hovering above the coloured sections will relay the club.
# Combined Radar Charts for chance creation shooting
years = ['2010','2011','2012','2013','2014','2015']
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
r=df_Chelsea['chanceCreationShooting'],
theta=years,
fill='toself',
name='Chelsea'
))
fig.add_trace(go.Scatterpolar(
r=df_M_United['chanceCreationShooting'],
theta=years,
fill='toself',
name='Manchester United'
))
fig.add_trace(go.Scatterpolar(
r=df_M_City['chanceCreationShooting'],
theta=years,
fill='toself',
name='Manchester City'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 100]
)),
showlegend=False
)
fig.show()
The radar chart above represents the progression over the period of 2010 to 2015 for chance creation for shooting per club. Hovering above the coloured sections will relay the club.
Within all the visualizations the seasons most present are: 2012 - 4 occurrences 2014 - 4 occurrences
In the 2012 season the Champion Manchester City only won by goal difference while in the 2014 season the Champion Manchester City once again won narrowly by a 2 point gap. Thus in most cases between 2010 and 2015, the EPL champion is not the leader in either of the team attributes studied, with the seasons 2012 and 2014 showing greater competition towards the winning of the title.
The limitation to this exploration is that an exact correlation to a teams creative dominance to being a champion isn't a clear, thus leading this exploration to be more speculatory. Since the exploration is focussed on the eventual champions teams that are known to have creative football philosophies aren't represented within this study.